﻿// ===============================================================================
// XCI.Parent 西安交通信息WinForm开发框架 2019 版权所有
// ===============================================================================

using XCI.Config;
using XCI.Helper;

namespace XCI.Sys
{
    /// <summary>
    /// 主题设置
    /// </summary>
    public class ThemeSetting
    {
        private static readonly IConfigProvider config = new JsonConfigProvider(IOHelper.GetRootFilePath("theme.json"));

        /// <summary>
        /// 获取主题配置
        /// </summary>
        public static ThemeSetting GetThemeSetting()
        {
            return config.Get("Theme", () => new ThemeSetting());
        }

        /// <summary>
        /// 保存主题配置
        /// </summary>
        public static void SaveThemeSetting()
        {
            config.Save();
        }

        /// <summary>
        /// 样式
        /// </summary>
        public string Style { get; set; } = "Skin";

        /// <summary>
        /// 主题
        /// </summary>
        public string SkinName { get; set; } = "Office 2019 Colorful";

        /// <summary>
        /// 配色
        /// </summary>
        public string SvgPaletteName { get; set; }

        /// <summary>
        /// 字体
        /// </summary>
        public string FontName { get; set; } = "微软雅黑, 9.75pt";

        /// <summary>
        /// 是否使用DirectX加速
        /// </summary>
        public bool UseDirectX { get; set; } = true;
    }
}